// JavaScript Document
function verificaNumero(e) {
    if (e.which != 8 && e.which != 0 && (e.which < 48 || e.which > 57)) {
        return false;
    }
}

function confirmar(form){
	if(confirm("Tem certeza que deseja excluir?")){
		form.submit();
	}
}

$(document).ready(function(){
	$("#login").corner();
	$("#menu").corner();
	$(".carrinho").corner();
	$(".logout").corner();
	$("#menu input[type=text]").corner();
	$("#menu input[type=submit]").corner();
	$("#topo a.login").corner();
	$("#topo a.login").click(function(){
		$("#topo a.login").hide();
		$("#login").fadeIn();
	});
	$("#login").hide();
	$("#login input[type=text]").corner();
	$("#login input[type=submit]").corner();
	
	$("#login input[type=password]").corner();
	
	$("#login input[type=button]").corner();
	$("#login .cancel").click(function(){
		$("#login").hide();
		$("#topo a.login").fadeIn();
	});
	
	$(".price").priceFormat({
		prefix: '',
              centsSeparator: '.',
              thousandsSeparator: ''
	});
	
	$(".number").keypress(verificaNumero);
	

});